﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.master" AutoEventWireup="true" CodeBehind="TempoTracking.aspx.cs" Inherits="GPSTracker.Views.Report.TempoTracking" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <script src="../JS/TempoTrackingJS.js"></script>
    <link href="../CSS/TempoTracking.css" rel="stylesheet" />

    <script language="javascript" type="text/javascript">

        function Fade(div) {
            setTimeout("document.getElementById('" + div + "').style.display='none'", 4000);
        }

    </script>

    <script src="../JS/jquery-1.10.2.js"></script>

    <asp:ScriptManager ID="scrptMgr" runat="server">
    </asp:ScriptManager>

    <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />

    <link href="http://code.google.com/apis/maps/documentation/javascript/examples/default.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>

    <asp:UpdatePanel ID="UpMain" runat="server" UpdateMode="Conditional">
        <ContentTemplate>

            <script type="text/javascript">
                $(window).ready(function () {

                    var ht = window.innerHeight - 150;
                    $('#container').css('height', ht);

                });
                $(window).resize(function () {

                    var ht = window.innerHeight - 150;
                    $('#container').css('height', ht);

                });
                var prm = Sys.WebForms.PageRequestManager.getInstance();

                prm.add_endRequest(function () {
                    var ht = window.innerHeight - 150;
                    $('#container').css('height', ht);
                });
            </script>


            <style type="text/css">
                #container {
                    position: relative;
                    min-height: 150px;
                }

                #sidebar {
                    position: absolute;
                    left: 0;
                    top: 0;
                    height: 100%;
                    width: 100%;
                    overflow-y: scroll;
                }
            </style>


            <div id="container">
                <div id="sidebar">


                    <table cellspacing="5" cellpadding="5" width="98%" border="0" align="center">
                        <tr>
                            <td style="width: 100%; height: 100%; text-align: center;">
                                <fieldset class="FiledSetDesign">
                                    <legend class="PageHeading" align="center">
                                        <asp:Label ID="lblHead" runat="server" Text="Tempo Tracking - Report"></asp:Label>
                                    </legend>

                                    <table style="width: 100%; height: 100%" align="center" cellspacing="0" cellpadding="0">
                                        <tr>
                                            <td style="padding-left: 5px; padding-top:10px; padding-bottom:5px; text-align: left;" width="10%">
                                                <dx:ASPxLabel ID="lblTempo" runat="server" Text="Select Tempo : "></dx:ASPxLabel>
                                            </td>
                                            <td style="padding-top:10px; padding-bottom:5px; text-align: left;" width="90%">
                                                <dx:ASPxComboBox ID="cmbTempo" runat="server" IncrementalFilteringMode="Contains" Width="200" 
                                                    OnDataBound="cmb_DataBound" CssClass="AllControls">
                                                </dx:ASPxComboBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="padding-left: 5px;padding-bottom:5px; text-align: left;">
                                                <dx:ASPxLabel ID="lblFromDate" runat="server" Text="From Date : "></dx:ASPxLabel>
                                            </td>
                                            <td style="padding-bottom:5px;text-align: left;">
                                                <dx:ASPxDateEdit ID="dtpFromDate" runat="server" Width="200" EditFormat="DateTime" DisplayFormatString="dd-MMM-yyyy hh:mm tt" 
                                                                    EditFormatString="dd-MMM-yyyy hh:mm tt">
                                                    <TimeSectionProperties Visible="True">
                                                        <TimeEditProperties EditFormatString="hh:mm tt" />
                                                    </TimeSectionProperties>
                                                </dx:ASPxDateEdit>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="padding-left: 5px;padding-bottom:5px; text-align: left;">
                                                <dx:ASPxLabel ID="ASPxLabel1" runat="server" Text="To Date: "></dx:ASPxLabel>
                                            </td>
                                            <td style="padding-bottom:5px;text-align: left;">
                                                <dx:ASPxDateEdit ID="dtpToDate" runat="server" Width="200" EditFormat="DateTime" DisplayFormatString="dd-MMM-yyyy hh:mm tt" 
                                                                    EditFormatString="dd-MMM-yyyy hh:mm tt">
                                                    <TimeSectionProperties Visible="True">
                                                        <TimeEditProperties EditFormatString="hh:mm tt" />
                                                    </TimeSectionProperties>
                                                </dx:ASPxDateEdit>
                                            </td>
                                        </tr>

                                        <tr>
                                            <td colspan="2" style="padding-left: 5px;text-align:left;">
                                                <dx:ASPxButton ID="btnSearch" runat="server" Text="Search" OnClick="btnSearch_Click" Width="80">
                                                    <ClientSideEvents Click="function(s, e)
                                                                        {
                                                                            if(Validate() == true)
                                                                            {
                                                                                e.processOnServer = true; 
                                                                            }
                                                                            else
                                                                            {
                                                                                e.processOnServer = false;
                                                                            }
                                                                        }
                                                                    " />
                                                </dx:ASPxButton>
                                            </td>
                                        </tr>

                                        <tr>
                                            <td style="padding: 10px; width: 100%; height: 100%; overflow: auto;" colspan="2">

                                                <div id="map_canvas" style="width: 100%; height: 600px;">
                                                </div>
                                            </td>
                                        </tr>

                                    </table>
                                </fieldset>
                            </td>
                        </tr>
                    </table>

                </div>
            </div>

        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
